@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式 */
:root {
  --primary-color: #7c3aed;
  --primary-light: #f0f0ff;
  --text-color: #333;
  --border-color: #e0e0e0;
  --background-light: #f7f7f8;
  --background-white: #ffffff;
  --foreground-rgb: 0, 0, 0;
  --background-start-rgb: 214, 219, 220;
  --background-end-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
  :root {
    --foreground-rgb: 255, 255, 255;
    --background-start-rgb: 0, 0, 0;
    --background-end-rgb: 0, 0, 0;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: rgb(var(--foreground-rgb));
  background: linear-gradient(
      to bottom,
      transparent,
      rgb(var(--background-end-rgb))
    )
    rgb(var(--background-start-rgb));
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.aside {
  width: 300px;
  background-color: var(--background-light);
  transition: width 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.aside.collapsed {
  width: 0;
  padding: 0;
}

.aside.collapsed .aside-content {
    display: none;
}

.aside-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}

.chat-config {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.aside-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 1rem;
}

.collapsed-header {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.collapsed-header .avatar {
    margin-top: 4px;
    border-radius: 50%;
}

.separator {
    margin: 0 0.5rem;
    color: var(--text-color);
}

.title-dropdown-container {
    position: relative;
    display: inline-block;
}

.header-title-text {
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

.edit-chat-title-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 0.5rem;
    padding: 0.25rem;
}

.header-title-input {
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 1rem;
}

.header-more-options {
    position: relative;
    margin-left: auto;
}

.more-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.header-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
    width: 120px;
    padding: 0.5rem 0;
}

.header-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.header-dropdown-menu .dropdown-item:hover {
    background-color: var(--background-light);
}

.header-dropdown-menu .dropdown-item .icon {
    margin-right: 0.5rem;
}

.main-content {
  flex-grow: 1;
  transition: margin-left 0.3s ease;
  margin-left: 0;
}

.main-content.aside-collapsed {
  margin-left: 0;
}

/* 样式文件已在布局文件中导入，此处不再重复导入 */
